/*
 * Random.h
 *
 *  Created on: 2011/09/04
 *      Author: naoki
 */

#ifndef INCLUDED_NTENGINE_MATH_RANDOM_H
#define INCLUDED_NTENGINE_MATH_RANDOM_H

namespace NTEngine {
namespace Math {

/**
 * @brief 乱数生成
 */
class Random {
public:
	/**
	 * @brief 生成します
	 */
	static Random create( int seed = 0 );

	/**
	 * @brief
	 */
	int nextInt();

	/**
	 * @brief
	 */
	int nextInt( int a );

	/**
	 * @brief
	 */
	float nextFloat();

	/**
	 * @brief
	 */
	void setSeed( int seed );

	Random();
	~Random();
	Random( const Random& );
	Random& operator=( const Random& );
	void release();
	bool operator==( const Random& ) const;
	bool operator!=( const Random& ) const;
	int referenceCount() const;
	operator void*() const;
private:
	class Impl;
	Impl* mImpl;
};

} // namespace Math
} // namespace NTEngine

#endif // INCLUDED_NTENGINE_MATH_RANDOM_H
